const http = require( 'http' );
const qs = require( 'querystring' );
const server = http.createServer();
server.on( 'request', ( req, res ) => { 
    // console.log(req);
    let query = req.url.replace( /\/?\??/, '' )
    console.log( qs.parse( query ) );
    res.setHeader('Content-Type','text/html;charset=utf8')
    res.end( 'hello，你好' );
} );
server.listen( 8080, () => { 
    console.log('web启动');
})